#pragma once


// CTransparentStatic2

class CStaticEx : public CStatic
{
	DECLARE_DYNAMIC(CStaticEx)

public:
	CStaticEx();
	virtual ~CStaticEx();

	void SetFontUnderline(BOOL Set);
	void SetFontItalic(BOOL Set);
    void SetFontBold(BOOL Bold);
	void SetTextColor(COLORREF Color);
    void SetCtrlCursor(HCURSOR Cursor);
protected:
    afx_msg LRESULT OnSetText(WPARAM,LPARAM);
    afx_msg HBRUSH CtlColor(CDC* /*pDC*/, UINT /*nCtlColor*/);
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
    afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	//afx_msg void OnMouseMove(UINT nFlags, CPoint Point);
    DECLARE_MESSAGE_MAP()

private:
    void ReconstructFont();

    COLORREF m_TextClr;             // Text color
    CBitmap m_BgBmp;                // Background color (copy from parent's)
    CFont	m_Font;                 // Text's font
    HCURSOR m_Cursor;               // Cursor when mouse hangs over the static
    LOGFONT m_LogFont;              // Font parameter for Text's font

};


